<?php
session_start();
include_once ('inc/class/Util.class.php');
$_SESSION['current_page'] = Util::getPage();
include_once ('inc/class/User.class.php');
include_once ('inc/global/global.inc.php');
include_once ('inc/code/head.php');

if(isset($utente)){




//Invio dei dati per assegnare un ticket
if(isset($_REQUEST['assegnato'])){
    $res = User::assegna_ticket($_POST['id_ticket'], $_POST['id_user']);
    if($res)
        echo "<script> alert('Ticket assegnato') </script>";
}


?>
<div id="content">

        <div id="navProfile">
            <ul>
                <li><a href="ticket_admin.php?action=ticketDettagli">Dettagli ticket</a></li>
                <li><a href="ticket_admin.php?action=ticketAssegna">Assegna ticket</a></li>
            </ul>
        </div>

        <?php
        if($_GET["action"] == "ticketDettagli"){
            include ('inc/code/ticketDettagli.php');
        }else if($_GET["action"] == "ticketAssegna"){
            include ('inc/code/ticketAssegna.php');
        }else if($_GET["action"] == "ticketInfo"){
            include ('inc/code/ticketInfo.php');
        }

        ?>

    </div>
</div>


<?php
include ('inc/code/footer.php');
}
    else
        Util::logoutRedirect();
?>